HAL NOR migration: List of applicable concepts ¶
This section provides information about the HAL NOR applicable architecture concepts.
Concepts for NOR ¶
|
Concept |
Description |
|---|---|
|
The initialization has been split into separate initialization and configuration functions:
|
|
|
Removal and conversion of init structure to configuration structure |
The initialization structure
|
|
The handle structure
|
|
|
The initialization structure
|
|
|
The
|
|
|
Two functions to set and get user data are available:
|
|
|
The state machine is reworked to ensure transitions of the peripheral functional states. |
|
|
The HAL NOR functions were updated to return:
|
|
|
All TypeDef parts of the HAL NOR driver have been removed and replaced by
|
|
|
Const keywords have been added to non-modifiable pointers to ensure that either the pointer itself or the data it points to cannot be modified. This enhances code safety and readability, prevents unintended modifications, and renders code more robust and maintainable. |
|
|
The parameters and state are checked using these macros:
|
|
|
Rename LL core drivers to stm32_ppp_core.h/.c to avoid confusion with user LL drivers. |
The core driver name has been changed from
|
|
Add HAL PPP Services for Drivers with Handle to Retrieve Corresponding Peripheral Clock Frequency. |
HAL NOR provides new API to retrieve clock frequency
|
|
Replace Finite Parameter Defines (Including PPP Instances) with Enum Types at HAL Levels. |
Finite parameters (including NOR instances) have been converted into enumerated types (enums) at HAL level. This improves code readability, maintainability, and type safety. |
|
Add HAL_PPP Prefix to All HAL Peripheral APIs (Defines, Macros, Types, and Functions). |
All HAL NOR functions start with
|
Other HAL NOR changes ¶
|
Concept |
Consideration |
|---|---|
|
Use directly the sub bank as the unitary instance |
Instead of initializing the instance by the base address of the bank 1 then selecting the subbank by configuring the NS bank, the user will choose directly one of the 4 subbanks of bank 1 as instance :
Each selection contains the base address of bank 1 plus the subbank offset. |
|
Split the configuration structure into FMC configuration and memory specific configuration |
The configuration has been split into:
|
|
Split the configuration sequence into steps to fit with the use case |
The configurations are set using:
|
|
Change timing parameters unit from cycle to ns |
Static API is added to convert these values before setting them in the FMC register. |
|
Split the process APIs and structures per CFI to and to interface with three CFIs (Common Flash Interface) |
The control of the NOR memory input and output access and structures is split into these three command sets:
|